package com.newtouch.bxzs.database.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.newtouch.bxzs.common.base.model.DataDictionary;
import com.newtouch.bxzs.common.base.model.bo.DataDictionaryValueBO;
import com.newtouch.bxzs.database.model.bo.DictionaryEntryBO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 数据字典的mapper类
 *
 * <p>
 * <b>History:</b>
 * <table border="1">
 * <tr>
 * <th>Date</th>
 * <th>Operator</th>
 * <th>Memo</th>
 * </tr>
 * <tr>
 * <td>2021/1/4</td>
 * <td>zhangqianyang</td>
 * <td>Create</td>
 * </tr>
 * </table>
 *
 * @author zhangqianyang
 * @version 1.0.0
 * @since 1.0.0
 */

@Mapper
public interface DataDictionaryMapper extends BaseMapper<DataDictionary> {


    /**
     * 1
     * 获取所有的字典值，放在缓存中
     *
     * @return HashMap
     */
    List<DictionaryEntryBO> getAllDataDictionaryEntry();

    /**
     * 根据字典code获取字典项值
     *
     * @param dictionaryCode 字典code
     * @return List<DataDictionaryValueBO>
     */
    List<DataDictionaryValueBO> listDataDictionaryEntryByCode(@Param("dictionaryCode") String dictionaryCode);
}
